package org.tea.mapper.common;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.tea.mapper.util.BaseInsertMapperProvider;

import java.util.List;

/**
 * 插入方法
 *
 *@author lxh
 */
@Mapper
public interface BaseInsertMapper<T> {

    @InsertProvider(type = BaseInsertMapperProvider.class, method = "insert")
    int insert(@Param("param") T row);

    @InsertProvider(type = BaseInsertMapperProvider.class, method = "insertSelective")
    int insertSelective(T row);

    @InsertProvider(type = BaseInsertMapperProvider.class, method = "insertBatch")
    int insertBatch(List<? extends T> rowList);

    @InsertProvider(type = BaseInsertMapperProvider.class, method = "insertSelectiveBatch")
    int insertSelectiveBatch(List<? extends T> rowList);
}
